Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply inferface change to duplicated code in the tgis layer #50

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

maxdebayser
Copy link
Contributor

In the upstream code the init_state() method was removed from the Outlines logits processor classes but the call to this method was still in our tgis layer causing this error:

ERROR 06-19 16:12:57 logs.py:77] generate{input=[b'Hello, I am here to'] prefix_id= adapter_id= input_chars=[19] params=decoding { format: JSON }: 'CFGLogitsProcessor' object has no attribute 'init_state'
ERROR 06-19 16:12:57 grpc_server.py:86] Generate failed
ERROR 06-19 16:12:57 grpc_server.py:86] Traceback (most recent call last):
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/entrypoints/grpc/grpc_server.py", line 103, in func_with_log
ERROR 06-19 16:12:57 grpc_server.py:86]     return await func(*args, **kwargs)
ERROR 06-19 16:12:57 grpc_server.py:86]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/entrypoints/grpc/grpc_server.py", line 153, in Generate
ERROR 06-19 16:12:57 grpc_server.py:86]     sampling_params, deadline = await self._validate_and_convert_params(
ERROR 06-19 16:12:57 grpc_server.py:86]                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/entrypoints/grpc/grpc_server.py", line 430, in _validate_and_convert_params
ERROR 06-19 16:12:57 grpc_server.py:86]     await get_outlines_guided_decoding_logits_processor(decoding,
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/tgis_utils/guided_decoding.py", line 44, in get_outlines_guided_decoding_logits_processor
ERROR 06-19 16:12:57 grpc_server.py:86]     logits_processor.init_state()
ERROR 06-19 16:12:57 grpc_server.py:86]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
@maxdebayser maxdebayser marked this pull request as ready for review June 19, 2024 16:34
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @maxdebayser!

@joerunde joerunde merged commit 3122d24 into main Jun 19, 2024
14 of 15 checks passed
joerunde pushed a commit that referenced this pull request Jun 19, 2024
In the upstream code the `init_state()` method was removed from the
Outlines logits processor classes but the call to this method was still
in our tgis layer causing this error:

```
ERROR 06-19 16:12:57 logs.py:77] generate{input=[b'Hello, I am here to'] prefix_id= adapter_id= input_chars=[19] params=decoding { format: JSON }: 'CFGLogitsProcessor' object has no attribute 'init_state'
ERROR 06-19 16:12:57 grpc_server.py:86] Generate failed
ERROR 06-19 16:12:57 grpc_server.py:86] Traceback (most recent call last):
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/entrypoints/grpc/grpc_server.py", line 103, in func_with_log
ERROR 06-19 16:12:57 grpc_server.py:86]     return await func(*args, **kwargs)
ERROR 06-19 16:12:57 grpc_server.py:86]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/entrypoints/grpc/grpc_server.py", line 153, in Generate
ERROR 06-19 16:12:57 grpc_server.py:86]     sampling_params, deadline = await self._validate_and_convert_params(
ERROR 06-19 16:12:57 grpc_server.py:86]                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/entrypoints/grpc/grpc_server.py", line 430, in _validate_and_convert_params
ERROR 06-19 16:12:57 grpc_server.py:86]     await get_outlines_guided_decoding_logits_processor(decoding,
ERROR 06-19 16:12:57 grpc_server.py:86]   File "/opt/vllm/lib/python3.11/site-packages/vllm/tgis_utils/guided_decoding.py", line 44, in get_outlines_guided_decoding_logits_processor
ERROR 06-19 16:12:57 grpc_server.py:86]     logits_processor.init_state()
ERROR 06-19 16:12:57 grpc_server.py:86]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

---------

Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants